:bug: Fix Bug: MchInfoEncryptLogInfo.MultipleObjectsReturned

Kimi.Huang 6 years ago
parent
commit
4d0a9db1ea
1 changed files with 2 additions and 0 deletions
  1. 2 0
      page/sale_views.py

+ 2 - 0
page/sale_views.py

@@ -92,6 +92,8 @@ def clerk_sale_decrypt_api(request):
92 92
         elog = MchInfoEncryptLogInfo.objects.get(sn=sn)
93 93
     except MchInfoEncryptLogInfo.DoesNotExist:
94 94
         elog = None
95
+    except MchInfoEncryptLogInfo.MultipleObjectsReturned:
96
+        elog = None
95 97
 
96 98
     user_id = request.POST.get('user_id', '')
97 99
     lat = request.POST.get('lat', .0)